#ifndef __SCENE_H__
#define __SCENE_H__

#include "Ogre.h"
#include "FrameworkDef.h"
//#include "Sprite.h"
//#include "AnimationSet.h"
//#include "ThorSceneManager.h"

#include "btBulletDynamicsCommon.h"

class Sprite;
class ThorSceneManager;
class Scene{
public:

	Scene(Ogre::SceneManager * ,Ogre::Camera * );
	~Scene();

	Ogre::SceneManager * m_pSceneMgr;
	Ogre::Camera * m_pCamera;

	std::map<Ogre::String, Sprite *> m_vNpc;

	virtual void load();
	virtual void init();
	virtual void update(Ogre::Real timeSinceLast);
	virtual void eventClick(int _xx, int _yy);
	virtual void eventMouseMove(int _xx, int _yy, int x_rel, int y_rel, bool isButtonDown);
	virtual void eventMouseRelease(int _xx, int _yy);
	virtual void stateMouseDown();

	virtual Sprite* _createOneSprite(Ogre::String, int type, Ogre::String spriteName);
	virtual void _createSprites();
	void _setupCamera();
	void _createBackGround();

	Sprite* getNPCSprite(Ogre::String _spriteName);


	//////////////////FX related 
	btDiscreteDynamicsWorld* dynamicsWorld;
	btDefaultCollisionConfiguration* collisionConfiguration;
	btCollisionDispatcher* dispatcher;
	btSequentialImpulseConstraintSolver* solver;

	void _createFxWorld();
	
	
protected:


private:

typedef struct _IOData
{
public:
	int x;
	int y;
	int x_rel;
	int y_rel;
	int isButtonDown;
	_IOData(){};
	_IOData(int _x, int _y, int _x_rel, int _y_rel, bool _isButtonDown)
	{
		x = _x; y = _y; x_rel = _x_rel; y_rel = _y_rel; isButtonDown = _isButtonDown;
	};
}IOData;

	IOData m_IOData;

};




#endif